<?php

namespace common\logics;

use Yii;
use common\models\keyword\KeywordRelation;
use common\helpers\Url;
use common\helpers\ArrayHelper;

/**
 * 简洁商品模型
 * 
 * @author emhome<emhome@163.com>
 * @since 2.0
 */
class ShopProductMinLogic extends \common\models\shop\ShopProduct {

    public function fields() {
        return [
            'id',
            'title' => 'name',
            'thumb' => function() {
                return Url::attach($this->cover);
            },
            'price',
            'slogan',
            'description',
            'weblink',
        ];
    }

}
